<ui:composition template="/WEB-INF/templates/main-template.xhtml"
	xmlns="http://www.w3.org/1999/xhtml"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:p="http://primefaces.org/ui">

	<ui:define name="sidebar">
		<ui:include src="/WEB-INF/templates/public-sidebar.xhtml" />
	</ui:define>
	<ui:define name="content">
		<h:form id="customLookUpsForm">
			<h:panelGrid style="width: 100%">
				<h:outputText value="Custom Lookups" styleClass="outputTextTitle" />
				<h:inputHidden value="#{createCustomLookupsBean.stringName}" />
				<h:panelGrid style="width: 100%">
					<h:outputText value="Existing Custom Lookups" styleClass="outputTextSubTitle" />
					<p:dataTable value="#{createCustomLookupsBean.customLookupList}" var="row" paginator="true" rows="5">
						<p:column headerText="Custom Lookup Name">
						<p:cellEditor>  
			                <f:facet name="output">  
			                    <h:outputText value="#{row.customLookupName}" />  
			                </f:facet>  
			                <f:facet name="input">  
			                    <p:inputText value="#{row.customLookupName}" style="width:100%"/>  
			                </f:facet>  
			            </p:cellEditor> 
						</p:column>
						<p:column headerText="Display Name">
						<p:cellEditor>  
			                <f:facet name="output">  
			                    <h:outputText value="#{row.displayName}" /> 
			                </f:facet>  
			                <f:facet name="input">  
			                    <p:inputText value="#{row.displayName}" style="width:100%" />  
			                </f:facet>  
			            </p:cellEditor>
						</p:column>
						
						<p:column headerText="Edit">
							<p:rowEditor >
							
							</p:rowEditor>	
													
						</p:column>						
					</p:dataTable>
				</h:panelGrid>
								
				
				 
				
				 <p:commandButton value="Add New Custom Lookup" actionListener="#{createCustomLookupsBean.addNewCustomLookupButtonActionListener}" update="@form"/>
				 
				
				
				<h:panelGrid style="margin: 10px 0; width: 100%;" rendered="#{createCustomLookupsBean.renderNewCustomLookupPanel}" >
					<h:outputText value="New Custom Lookup Details" styleClass="outputTextSubTitle" />
					<h:panelGrid columns="4" style="width: 100%">
						<h:panelGroup>
							<h:outputText value="Custom Lookup Name" />
							<br />
							<p:inputText value="#{createCustomLookupsBean.customLookup.customLookupName}" id="lookupName" styleClass="selectOneMenu168pxFixedWidth" />
							<p:watermark for="lookupName" value="Enter a custom lookup name" />    
						</h:panelGroup>
						
						<h:panelGroup>
							<h:outputText value="Custom Lookup Display Name" />
							<br />
							<p:inputText value="#{createCustomLookupsBean.customLookup.displayName}" id="displayName" styleClass="selectOneMenu168pxFixedWidth" />
							<p:watermark for="displayName" value="Enter a display name" />  
						</h:panelGroup>
						
						
						
						<h:panelGroup>
							<h:outputText value="Discription" />
							<br />
							<p:inputText value="#{createCustomLookupsBean.customLookup.description}" id="discription" styleClass="selectOneMenu168pxFixedWidth" />								
							<p:watermark for="discription" value="Enter a description name" />						  
						</h:panelGroup>								 										
					</h:panelGrid>		
					<h:panelGrid columns="2">
						<p:commandButton value="Save Custom Lookup" actionListener="#{createCustomLookupsBean.saveCustomLookup}" update="@form"/>
						<p:commandButton value="Discard" actionListener="#{createCustomLookupsBean.discard}" update="@form"/>
					</h:panelGrid>			
				</h:panelGrid>
				
				
		
				
				
			</h:panelGrid>
			<p:growl id="growl" />
		</h:form>
	</ui:define>
</ui:composition>

